<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="UTF-8">
		<title>超市订单管理系统</title>
		<link type="text/css" rel="stylesheet" href="../css/style.css" />
		<link type="text/css" rel="stylesheet" href="../css/public.css" />
	</head>
	<body>
		<!--头部-->
		<header class="publicHeader">
			<h1>超市订单管理系统</h1>
			<div class="publicHeaderR">
				<p>
					<span id="welcome"></span><span id="userName" style="color: #fff21b"> 用戶名</span> , 欢迎你！
				</p>
				<a href="javascript:logout()">退出</a>
			</div>
		</header>
		<!--时间-->
		<section class="publicTime">
			<span id="time"></span> <a href="#">温馨提示：为了能正常浏览，请使用高版本浏览器！（IE10+）</a>
		</section>
		<!--主体内容-->
		<section class="publicMian ">
			<div class="left">
				<h2 class="leftH2">
					<span class="span1"></span>功能列表 <span></span>
				</h2>
				<nav>
					<ul class="list">
						<li><a href="user_list.html" target="content">用户管理</a></li>
						<li><a href="bill_list.html" target="content">订单管理</a></li>
						<li><a href="javascript:;" target="content">供应商管理</a></li>
						<li><a href="javascript:;" target="content">密码修改</a></li>
					</ul>
				</nav>
			</div>
			<div class="right">
				<iframe name="content" src="main.html" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>
			</div>
		</section>
		<footer class="footer"> 版权归CL所有 </footer>
		<script type="text/javascript" src="../js/time.js"></script>

	<script src="../js/jquery-3.5.1.js"></script>
	<script>
		//显示登录的用户名
		$("#userName").text(localStorage.userName);
		//退出
		function logout(){
			$.ajax({
				url:"../user/logout",
				dataType:"json",
				success:function (result){
					if (result.flag){
						location.href="../login.html";
					}else {
						alert(result.msg);
					}
				},
				error:function (jqxhr){
					alert("请求出错:"+jqxhr.status);
				}
			});
		}
	</script>
	</body>
</html>
